import axios from 'axios'
// 创建一个 axios 实例
const http = axios.create({
	timeout: 30000, // 请求超时时间毫秒
	withCredentials: false, // 异步请求携带cookie
})
 
//拦截器 请求拦截 
http.interceptors.request.use(config => {
  return config;
}, error => {
  console.log(error)
  return Promise.reject(error);
});
 
//拦截器 响应拦截
http.interceptors.response.use(response => {
  return response
}, error =>{
  console.log(error)
  return Promise.reject(error)
});
 
export default http;